package com.fs.base.pojo;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.fs.base.utils.StringTools;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author TiddlerCJ
 * @desc 实体对象
 */

@Entity
@Table(name="s_modle")
@Data@EqualsAndHashCode(callSuper=false)
@AllArgsConstructor
@NoArgsConstructor
public class Modle extends PkEntity{
	private String className;
	private String modleName;
	
	public static Modle newInstance(String className){
		String[] datas = className.split("\\.");
		String _modleName = datas[datas.length-1];
		_modleName = StringTools.toLowerCaseFirstOne(_modleName);
		return new Modle(className, _modleName);
	}
}
